package com.example.tys.daggermvp.network.okhttpclient;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 * @author tys
 * @date 2018/4/22
 */

public class BaseOkHttpClient {
    private static final long TIMEOUT_CONNECT = 10 * 1000;

    public OkHttpClient get() {
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        builder.connectTimeout(TIMEOUT_CONNECT, TimeUnit.MILLISECONDS);
        builder = customize(builder);
        return builder.build();
    }

    protected OkHttpClient.Builder customize(OkHttpClient.Builder builder) {
        return builder;
    }
}
